<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .parent {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
      }
      .child {
        background-color: burlywood;
        flex: 1 1 150px;
        margin: 5px;
      }
    </style>
  </head>
  <body>
    <!--   flex 简写代表：flex: <flex-grow> <flex-shrink> <flex-basis>  -->
    <!-- 通过使用 Flexbox 实现自适应，不需要在屏幕尺寸发生变化时通过媒体查询来调整这些元素的位置。 -->
    <div class="parent">
      <div class="child">1</div>
      <div class="child">2</div>
      <div class="child">3</div>
    </div>
  </body>
</html>
